<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>消息记录</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="messages-container">
        <h2>接收到的消息</h2>
        <table>
            <thead>
                <tr>
                    <th>接收时间</th>
                    <th>发送方 IP</th>
                    <th>发送方 用户名</th>
                    <th>消息内容</th>
                </tr>
            </thead>
            <tbody>
                {% for message in messages %}
                <tr>
                    <td>{{ message.timestamp }}</td>
                    <td>{{ message.ip }}</td>
                    <td>{{ message.username }}</td>
                    <td>{{ message.message }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
        <a href="/send_message">返回发送页面</a>
    </div>
</body>
</html>
